<div>
    <add-broker-dialog ref="addBrokerDialog" @brokerSaved="brokerSaved">
    </add-broker-dialog>
    <v-row no-gutters>
        <v-col cols="12" md="3" sm="6">
            <v-text-field v-model="search" append-icon="mdi-magnify" label="Search" single-line hide-details>
            </v-text-field>
        </v-col>
    </v-row>
    <v-row no-gutters>
        <v-col cols="12" md="11" sm="12">
            <v-data-table v-model="selected" :headers="headers" :items="brokers" :items-per-page="5" :search="search"
                item-key="id" no-data-text="No brokers available">
                <template v-slot:item.actions="{ item }">
                    <v-icon class="mr-2" @click="editItem(item)">
                        mdi-pencil
                    </v-icon>
                    <v-icon @click="deleteItem(item)">
                        mdi-delete
                    </v-icon>
                    <v-btn :class="item.registerStatus" @click="registerUnregister(item)">
                        <span v-if="item.registerStatus == 'registeredAtBroker'">Unregister</span>
                        <span v-else>Register</span>
                    </v-btn>
                </template>
            </v-data-table>
        </v-col>
    </v-row>
    <confirmation-dialog ref="confirmationDialog"></confirmation-dialog>
</div>